/**
*	流程模块：扩展js
*	开发者：雨中磐石
*	地址：www.rockoa.com
*	日期：2023-07-20
*/



js.todo_list = function(){
	
	this.initbodys = function(){
		var me = this;
		this.setcolumns('mess', {
			renderer:function(v, d, oi){
				var s = ''+v+'';
				if(d.mknum)s+=' <a clickevt="openxiang,'+oi+'" class="zhu">[详情]</a>';
				return s;
			}
		});
		if(this.iscompany){
			this.optobj.addbtn('清空消息','clearall', this, 'bg-danger');
			this.optobj.addbtn('全标已读','biaoyidu', this);
		}
		
	}
	this.onloadtable = function(d){
		this.table.initbtn(this);
	}
	
	this.openxiang = function(o1,oi){
		var d = this.table.getData(oi);
		xcy.openxiang({
			num:d.mknum,
			mid:d.mid,
			funitid:d.funitid,
			name:'详情',
			cnum:this.cnum,
			xiangwidth:this.xiangwidth,
			ismodal:true
		});
	}
	
	this.biaoyidu = function(){
		var me = this;
		js.ajax.get({
			loading:'标识中...',
			url:this.getacturl('biaoyidu'),
			loadsuccess:'标识成功'
		},function(ret){
			me.table.reload();
		});
	}
	
	this.clearall = function(){
		var me = this;
		js.ajax.get({
			loading:'删除中...',
			url:this.getacturl('clearall'),
			loadsuccess:'删除成功'
		},function(ret){
			me.table.reload();
		});
	}
	
}